<?php $this->load->view("partial/header"); ?>
<br>
<div id='menu_print' align='left'>
<a href='javascript:void(0)' onclick='window.print();'><img align='absbottom' src="<?php echo base_url().'images/printmgr.gif';?>" border="0" alt="Print" title='Print' height='30px' width='30px'></a>
</div>
<div id="receipt_wrapper">
	<div id="receipt_header">
		<div id="company_name"><?php echo $this->config->item('company'); ?></div>
		<div id="company_address"><?php echo nl2br($this->config->item('address')); ?></div>
		<div id="company_phone"><?php echo $this->config->item('phone'); ?></div>
		<div id="sale_receipt"><strong><u><?php echo $this->lang->line('common_newslip'); ?></u></strong></div>
		
	</div>
	<div id="receipt_general_info">
		<table class="" border="0" id="sortable_table">
			<tr><td><div id="customer"><?php echo $this->lang->line('staffs_id').": "; ?></div></td><td><div id="customer"><?php echo $person_info->account_number; ?></div></td></tr>
			<tr><td><div id="customer"><?php echo $this->lang->line('common_section').": "; ?></div></td><td><div id="customer"><?php echo $person_info->position; ?></div></td></tr>
			<tr><td><div id="customer"><?php echo $this->lang->line('common_name').": "; ?></div></td><td><div id="customer"><?php echo $person_info->last_name.' '.$person_info->first_name; ?></div></td></tr>
			<tr><td><div id="customer"><?php echo $this->lang->line('date').": "; ?></div></td><td><div id="customer"><?php echo $date; ?></div></td></tr>
		</table>
	</div>
	<br>
	<div id="table_holder">
		<table class="tablesorter" id="sortable_table"> 
			<tr><td width="20%"><strong><?php echo $this->lang->line('common_earnings'); ?></strong></td><td></td><td></td></tr>
			<tr><td></td><td width="25%"><?php echo $this->lang->line('staffs_basic_wage'); ?></td><td><?php echo to_currency($basic_wages,$this->config->item('currency_inuse')); ?></td></tr>
			<?php if(!empty($allowance))
					{
						foreach($allowance as $key => $value)
						{
							if(!empty($key))
							{ ?>
								<tr><td></td><td><?php echo ucwords(strtolower($key)); ?></td><td><?php echo to_currency($value,$this->config->item('currency_inuse')); ?></td></tr>
					<?php 	}
					
								
						}
					}
			?>
			<tr><td></td><td><?php echo $this->lang->line('staffs_allowances'); ?></td><td><?php echo to_currency($allowance_totals,$this->config->item('currency_inuse')); ?></td></tr>
			<tr><td></td><td><strong><?php echo $this->lang->line('staffs_gross_pay'); ?></strong></td><td><strong><?php echo to_currency($gross_pay,$this->config->item('currency_inuse')); ?></strong></td></tr>
			<tr><td><strong><?php echo $this->lang->line('staffs_deductions'); ?></strong></td><td></td><td></td></tr>
			<tr><td></td><td><?php echo  'SSF '.$default_ssf_percent_value.'%&nbsp;@ &nbsp;'.$this->lang->line('staffs_basic_wage') ; ?></td><td><?php echo to_currency($default_ssf_value,$this->config->item('currency_inuse')); ?></td></tr>
			<tr><td></td><td><?php echo $this->lang->line('staffs_income_tax'); ?></td><td><?php echo to_currency($tax,$this->config->item('currency_inuse')); ?></td></tr>
			<?php if(!empty($deductions))
					{
						foreach($deductions as $key => $value)
						{
							if(!empty($key))
							{ ?>
								<tr><td></td><td><?php echo ucwords(strtolower($key)); ?></td><td><?php echo to_currency($value,$this->config->item('currency_inuse')); ?></td></tr>
					<?php 	}
					
								
						}
					}
			?>
			<tr><td></td><td><?php echo $this->lang->line('staffs_deductions'); ?></td><td><?php echo to_currency($deduction_totals,$this->config->item('currency_inuse')); ?></td></tr>
			<tr><td></td><td><strong><?php echo $this->lang->line('staffs_total_deductions'); ?></strong></td><td><strong><?php echo to_currency($total_payroll_deductions,$this->config->item('currency_inuse')); ?></strong></td></tr>
			<tr><td>&nbsp;</td><td></td><td></td></tr>
			<tr><td></td><td><strong><?php echo $this->lang->line('staffs_net_pay'); ?></strong></td><td><strong><?php echo to_currency($net_pay,$this->config->item('currency_inuse')); ?></strong></td></tr>
			<tr><td>&nbsp;</td><td></td><td></td></tr>
			<tr><td><?php echo $this->lang->line('common_mode_of_pay'); ?></td><td>............................................</td><td></td></tr>
			<tr><td><?php echo $this->lang->line('common_paid_by'); ?></td><td>............................................</td><td></td></tr>
		</table>
	</div>

</div>
<?php $this->load->view("partial/footer"); 
?>



